{include file="$header" /}
<section class="mk-cms-warp">
    <aside class="aside">
        <section class="aside-wrap">
            <div class="side-title">{{lang('Categories')}}</div>
            <el-tree :data="treeData">
                <span class="custom-tree-node" slot-scope="{ node, data }">
                    <a :href="data.url">{{data.title}}</a>
                </span>
            </el-tree>
        </section>
    </aside>
    <div class="main">
        <div class="main-title">{$single.title}</div>
        <div class="main-content">
            <el-row :gutter="30">
                <el-col :sm="24" :md="12">
                    <el-image src="{$single.cover}"></el-image>
                </el-col>
                <el-col :sm="24" :md="12">
                    <h3>Short Description:</h3>
                    <p class="item"><span>{{lang("Number of Downloads")}}:</span>{$single.clicks}</p>
                    <p class="item"><span>{{lang("file size")}}:</span>{$single.size}</p>
                    <p class="item"><span>{{lang("Date of issue")}}:</span>{$single.create_time}</p>
                    <p class="item"><span>{{lang("file type")}}:</span>{$single.type}</p>
                    <a href="{$single.download_url}" target="_blank">
                        <el-button type="warning" size="small">{{lang("Click download")}}</el-button>
                    </a>
                </el-col>
            </el-row>
        </div>
        <div class="mk-next-prev-page">
            {empty name="prev"}
            <div>{{lang("prev page")}}：<el-link disabled>{{lang("empty")}}</el-link></div>
            {else/}
            <div>{{lang("prev page")}}：<el-link type="primary" href="{$prev['url']}">{$prev['title']}</el-link></div>
            {/empty}
            {empty name="next"}
            <div>{{lang("next page")}}：<el-link disabled>{{lang("empty")}}</el-link></div>
            {else/}
            <div>{{lang("next page")}}：<el-link type="primary" href="{$next['url']}">{$next['title']}</el-link></div>
            {/empty}
        </div>
    </div>
</section>
{include file="$component" /}
<script type="text/javascript">
    new Vue({
        el: '#app',
        data() {
            return {
                treeData: {:json_encode(get_catalog_child($catalog.class1))},
            }
        },
    });
</script>
{include file="$footer" /}